package com.flurry.android;

import android.app.Activity;
import android.app.Dialog;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.webkit.WebChromeClient;
import android.webkit.WebChromeClient.CustomViewCallback;
import android.widget.FrameLayout;
import android.widget.FrameLayout.LayoutParams;

final class co extends WebChromeClient
{
  private co(ft paramft, byte paramByte)
  {
  }

  public final void onHideCustomView()
  {
    if (ft.n(this.dp) == null);
    while (ft.o(this.dp) == null)
      return;
    if (ft.s(this.dp) != null)
      ft.s(this.dp).show();
    ((ViewGroup)ft.n(this.dp).getWindow().getDecorView()).removeView(ft.q(this.dp));
    ft.q(this.dp).removeView(ft.o(this.dp));
    if ((ft.r(this.dp) != null) && (ft.r(this.dp).isShowing()))
    {
      ft.r(this.dp).hide();
      ft.r(this.dp).setOnDismissListener(null);
      ft.r(this.dp).dismiss();
    }
    ft.a(this.dp, null);
    fd.a(ft.n(this.dp), ft.t(this.dp));
    ft.u(this.dp).onCustomViewHidden();
    ft.a(this.dp, null);
    ft.a(this.dp, null);
    ft.a(this.dp, null);
    this.dp.R.onCloseFullScreen(ft.m(this.dp), this.dp.T.getAdSpace().toString());
  }

  public final void onShowCustomView(View paramView, int paramInt, WebChromeClient.CustomViewCallback paramCustomViewCallback)
  {
    if (ft.n(this.dp) == null)
      return;
    if ((ft.o(this.dp) != null) && (ft.p(this.dp) != null))
    {
      ft.p(this.dp).onHideCustomView();
      return;
    }
    ft.a(this.dp, paramView);
    ft.a(this.dp, ft.n(this.dp).getRequestedOrientation());
    ft.a(this.dp, paramCustomViewCallback);
    ft.a(this.dp, new FrameLayout(ft.m(this.dp)));
    ft.q(this.dp).setBackgroundColor(-16777216);
    ft.q(this.dp).addView(ft.o(this.dp), new FrameLayout.LayoutParams(-1, -1, 17));
    ((ViewGroup)ft.n(this.dp).getWindow().getDecorView()).addView(ft.q(this.dp), -1, -1);
    if (ft.r(this.dp) == null)
    {
      ft.a(this.dp, new dv(this, ft.m(this.dp), 16973841));
      ft.r(this.dp).getWindow().setType(1000);
      ft.r(this.dp).setOnShowListener(new dt(this));
      ft.r(this.dp).setOnDismissListener(new ds(this));
      ft.r(this.dp).setCancelable(true);
      ft.r(this.dp).show();
    }
    fd.a(ft.n(this.dp), paramInt, true);
    this.dp.R.onOpenFullScreen(ft.m(this.dp), this.dp.T.getAdSpace().toString());
  }

  public final void onShowCustomView(View paramView, WebChromeClient.CustomViewCallback paramCustomViewCallback)
  {
    if (ft.n(this.dp) == null)
      return;
    onShowCustomView(paramView, ft.n(this.dp).getRequestedOrientation(), paramCustomViewCallback);
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.flurry.android.co
 * JD-Core Version:    0.6.2
 */